package com.zbkj.service.service;

import com.github.pagehelper.PageInfo;
import com.zbkj.dal.entity.ba.Booking;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zbkj.dal.pojo.request.PageParamRequest;
import com.zbkj.dal.pojo.request.ba.ConfirmRequest;
import com.zbkj.dal.pojo.request.ba.CreateBookingRequest;
import com.zbkj.dal.pojo.request.ba.QueryBookingRequest;
import com.zbkj.dal.pojo.response.ba.BookingResponse;

import java.util.List;

/**
 * <p>
 * 卡座预约 服务类
 * </p>
 *
 * @author jhui
 * @since 2023-10-03
 */
public interface BookingService extends IService<Booking> {

    /**
     * 我的预约
     * @param status
     * @param pageParamRequest
     * @return
     */
    List<BookingResponse> listMyBooking(Integer status, PageParamRequest pageParamRequest);

    /**
     * 删除我的预约
     * @param id
     */
    Boolean deleteMyBooking(Integer id);

    /**
     * 创建
     * @param createBookingRequest
     * @return
     */
    Boolean create(CreateBookingRequest createBookingRequest);

    /**
     * 预约详情（注意，本方法供前后台使用，如果判“我的预约“，请自行验证）
     * @param id
     * @return
     */
    BookingResponse detail(Integer id);

    /**
     * 分页查询预约
     * @param queryBookingRequest
     * @param pageParamRequest
     * @return
     */
    PageInfo<BookingResponse> queryBookings(QueryBookingRequest queryBookingRequest, PageParamRequest pageParamRequest);

    /**
     * 更新状态
     * @param confirmRequest
     * @return
     */
    Boolean confirm(ConfirmRequest confirmRequest);
}
